import 'package:flutter/material.dart';
import 'package:flutter_my_web/pages/home/edit_get_home_data_dialog.dart';
import 'package:flutter_my_web/widget/AppBarTitleWidget.dart';
import 'package:flutter_my_web/widget/BlueMaterialButton.dart';
import 'package:get/get.dart';

class SettingPage extends StatefulWidget {
  const SettingPage({Key? key}) : super(key: key);

  @override
  State<SettingPage> createState() => _SettingPageState();
}

class _SettingPageState extends State<SettingPage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: AppBarTitleWidget("设置"),
      ),
      body: Wrap(
        children: [
          BlueMaterialButton("查看文章列表", () async {
            // var data = await FileManagerApi().getAllText();
            // var sb = "";
            // data.data.forEach((element) {
            //   sb+=element.toString();
            // });
            // Get.dialog(Dialog(child: Container(height: 500,width: 200,child: SingleChildScrollView(child: SelectableText(sb.toString())),),));
          }),
          BlueMaterialButton("编辑首页数据", () {
            showEditGetHomeDataDialog();
          }),
        ],
      ),
    );
  }
}
